<template>
	<view class="box">
		<view class="title">吃了吗</view>
		<!-- <uni-title>吃了吗</uni-title> -->
		<image />
		<text>{{meal}}</text>
		<button @click="randam_chi()">点击</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				meal:'nomel'
			}
		},
		methods: {
			randam_chi(){
				const arr = ['麻辣烫','香锅','小炒']
				// console.log(Math.floor(Math.random()*arr.length))
				// uni.showModal({
				// 	title:加载,
					
				// })
				// uni.showToast({
				// 	title:加载中,
				// 	duration:2000
				// })
				this.meal = arr[Math.floor(Math.random()*arr.length)]
			}
			
		}
	}
</script>

<style>
	.box{
		text-align: center;
	}

</style>
